.PHONY:all
all:01_add.out 11_add2.out

%.s:%.sy
	../build/bin/sysyc $^ > $@

%.out:%.s
	arm-none-linux-gnueabihf-gcc $^ -o $@ -static
	arm-none-linux-gnueabihf-objdump -d $@ > $@.asm

.PHONY:run
run:01_add.out 11_add2.out
	qemu-arm ./01_add.out  ; echo $$?
	qemu-arm ./11_add2.out ; echo $$?

.PHONY:clean
clean:
	rm -rf *.asm *.out

.PHONY:distclean
	rm -rf *.asm *.out *.s
